﻿using NPOI.HSSF.Record;
using SmartPlant.Model;
using SmartPlant.Model.Biz;
using SmartPlant.WinCore;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace SmartPlant.Services.Interfaces
{
    public interface ICodeListService
    {
        #region dropDown

        public Task<List<DropDownListObj>> GetDropDownListByDefAsync(string ATTRIBUTE_DATATYPE, string type = "lookup", bool refresh = false);

        /// <summary>
        /// 查询某个
        /// </summary>
        /// <param name="ProjId"></param>
        /// <param name="propertyInfos"></param>
        /// <returns></returns>
        public Task<List<DropDownListObj>> GetDropDownListByAttrAsync(decimal itemattributionid);
        /// <summary>
        /// 查询好多个
        /// </summary>
        /// <param name="ProjId"></param>
        /// <param name="itemattributionids">逗号分开,</param>
        /// <returns></returns>
        public Task<List<List<DropDownListObj>>> GetDropDownListsByAttrAsync(string ProjId, List<string> ItemAttributionIds);
        #endregion

        #region location
        public Task<bool> AddCodeList(string type, DropDownListObj NewItem, bool refresh = false);
        public Task<bool> UpdateCodelist(string type, DropDownListObj NewItem, bool refresh = false);
        public Task<bool> DelCodelist(string type, string Id);
        #endregion
    }
}